package stu.aistar.mapper;

import org.apache.ibatis.annotations.*;
import stu.aistar.model.pojo.MovieAllTypes;

import java.util.List;

@Mapper
public interface MovieAllTypesMapper {

    @Select("select *from movie_all_types where movie_id = #{movieId}")
    MovieAllTypes findMovieTypes(@Param("movieId") Integer id);

    @Insert("Insert into movie_all_types(movie_id,type_ids) values(#{movieId},#{ids})")
    Integer insertMovieTypes(@Param("ids")String ids,@Param("movieId")Integer movieId);

    @Update("update movie_all_types set type_ids = #{ids} where movie_id = #{movieId}")
    Integer updateMovieTypes(@Param("ids")String ids,@Param("movieId")Integer movieId);
}
